package com.bank.manage.service.Impl;

import com.bank.manage.mapper.BankOptTransferRecordsMapper;
import com.bank.manage.model.BankOptTransferRecords;
import com.bank.manage.model.param.BankQueryParam;
import com.bank.manage.service.BankOptTransferRecordsService;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author grl
 * @since 2024-04-01
 */
@Service
public class BankOptTransferRecordsServiceImpl extends ServiceImpl<BankOptTransferRecordsMapper, BankOptTransferRecords> implements BankOptTransferRecordsService {

    @Override
    public Boolean recordExistQuery(BankQueryParam param) {
        QueryWrapper wrapper = QueryWrapper.create().eq(BankOptTransferRecords::getRequestId, param.getRequestId())
                .eq(BankOptTransferRecords::getSpecificValue, param.getSpecificValue()).from(BankOptTransferRecords.class);
        return exists(wrapper);
    }
}
